package o;

public abstract class gbb<E> implements gay<E> {
    static final /* synthetic */ boolean ʽ = (!gbb.class.desiredAssertionStatus());
    private int ˊ;
    private int ˏ;
    private E[] ॱ;

    protected abstract E[] ˊ(int i);

    protected abstract E ˋ();

    public gbb(int i) {
        this.ˊ = 0;
        this.ॱ = null;
        this.ˊ = 0;
        ˎ(i);
    }

    private void ˎ(int i) {
        int i2 = 0;
        Object ˊ = ˊ(i);
        if (this.ॱ != null) {
            System.arraycopy(this.ॱ, 0, ˊ, 0, this.ˏ);
        }
        while (i2 < ˊ.length) {
            ˊ[i2] = ˋ();
            i2++;
        }
        this.ॱ = ˊ;
        this.ˏ = ˊ.length;
    }

    public final E ˊ() {
        if (this.ˊ >= this.ˏ) {
            ˎ(this.ˏ * 2);
        }
        Object[] objArr = this.ॱ;
        int i = this.ˊ;
        this.ˊ = i + 1;
        return objArr[i];
    }

    public final void ˋ(E e) {
        if (ʽ || this.ˊ > 0) {
            Object[] objArr = this.ॱ;
            int i = this.ˊ - 1;
            this.ˊ = i;
            objArr[i] = e;
            return;
        }
        throw new AssertionError();
    }
}
